package cn.gong.ui;

import android.app.Activity;
import android.os.Bundle;
import cn.gong.http.bean.HttpCookie;
import cn.gong.http.bean.HttpTask;
import cn.gong.http.callback.HttpCallBack;
import cn.gong.utils.LogUtils;

public class MainActivity extends Activity implements HttpCallBack {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public void callBack(HttpTask task) {
		String data = task.getData();
		HttpCookie cookie = task.getHttpCookie();
		for (int i = 0; i < cookie.size(); i++) {
			LogUtils.log("cookie:"+cookie.getKey(i)+"="+cookie.getValue(i));
		}
		System.out.println(data);
	}
}
